#ifndef __REPORT_H_
#define __REPORT_H_

#include "MQTTClient.h"
#include "struct.h"
#include "report.h"

#define CLIENTID "ExampleClientSub"
#define RECVDATATOPIC "/app/data/down"
#define DATATOPIC "/app/data/up"
#define QOS 1
#define TIMEOUT 10000L

MQTTClient_message pubmsg;
MQTTClient_deliveryToken token;
char payloadptr[256];
volatile MQTTClient_deliveryToken deliveredtoken;
int set_type_period(int type, int period);
void do_control(cJSON *js, MQTTClient *client);
void mqttSend( char *str);
void delivered(void *context, MQTTClient_deliveryToken dt);
int msgarrvd(void *context, char *topicName, int topicLen, MQTTClient_message *message);
void connlost(void *context, char *cause);



#endif